<template>
	<view class="s-page-wrapper">
		<view class="index-goods" v-if="loadGoods">
		
			<!-- 产品轮播图 -->
			
			<view style="background-color: #17cb70;height: 155px;width: 100%;">
				<view class="project_name" style="">
					<!-- 天气预报 -->	
						<iframe id="fancybox-frame" 
						style='width: 100%;position: absolute;top: 10rpx;left: 66rpx;height: 12%;' 
						name="fancybox-frame1587633668147" frameborder="0" scrolling="no" hspace="0"
						 :src="city">
						 </iframe>	
				</view>
				<view>				
							
						<!-- <view>玫瑰里项目</view> -->
						<view class="projectinfo projectinfo_border" style="margin-right: 5%;">
							<view style="margin-left: 20px;">{{stateTime.dd}}</view>
							<view style="margin-left: 20px;">{{stateTime.yy}}</view>
							<image  style="height: 12px;width:12px;margin-right: 10px;vertical-align:text-top"
							 src="../../static/img/home/shijian.png"></image>
							开工时间</view>
						<view class="projectinfo projectinfo_border" style="">
							<view style="margin-left: 20px;">{{senTime.dd}}</view>
							<view style="margin-left: 20px;">{{senTime.yy}}</view>
							<image  style="height: 12px;width:12px;margin-right: 10px;vertical-align:text-top"
							 src="../../static/img/home/shijian.png"></image>
							竣工时间</view>
						<view class="projectinfo" style="">
							<view style="margin-left: 20px;">{{scheduleTime.dd}}</view>
							<view style="margin-left: 20px;">{{scheduleTime.yy}}</view>
							<image  style="height: 12px;width:12px;margin-right: 10px;vertical-align:text-top"
							 src="../../static/img/home/jindu.png"></image>
							项目进度</view>
				</view>
			</view>
			<view class="xiaoxi" >
				<view >
					<image
					style="height: 40px;width:40px;margin-right: 10px;vertical-align:middle"
					 src="../../static/img/home/xiaoxi.png"></image>
					暂无新消息，点击查看历史消息
				</view>
			</view>
			<view class="goods_info" style="padding-top: 6px;margin-top: 2%;">
				<view class="coupon-price s-row" style="margin-left: 5%;border-bottom-style: solid;
					border-bottom-color: #E6E6FA;">
					<view class="price" style="width: 60%;margin-bottom: 3%;">
						<text style="font-size: 18px"> 功能模块</text>
					</view>
				</view>
				<view  style="padding: 8px;margin-left: 3%;border-bottom-style: solid;position: relative;
						border-bottom-color: #E6E6FA;"  @click="zzzb('组织准备')">
					<image  style="height: 25px;width:25px;margin-right: 10px;vertical-align:text-top"
					 src="../../static/img/home/zhuzhizhunbei.png"></image>
				
					<text style="font-weight: bold;font-size:26rpx;vertical-align: -webkit-baseline-middle;">
						组织准备
						<text style="position: absolute;right: 40rpx;top: 25rpx;color: rgb(187, 187, 187);" 
						class="iconfont">&#xe610;</text>
					
					</text>
					
				</view>
				<view @click="zzzb('项目开工资料上传')" style="padding: 8px;margin-left: 3%;border-bottom-style: solid;position: relative;
						border-bottom-color: #E6E6FA;">
					<image  style="height: 25px;width:25px;margin-right: 10px;vertical-align:text-top"
					 src="../../static/img/home/zhlliaoshangchuan.png"></image>
					<text style="font-weight: bold;font-size:26rpx;vertical-align: -webkit-baseline-middle;">项目开工资料上传
						<text style="position: absolute;right: 40rpx;top: 25rpx;color: rgb(187, 187, 187);" 
						class="iconfont">&#xe610;</text>
					
					</text>
				</view>
			<!-- 	<view @tap="toinfoupload('进度控制')" style="padding: 8px;margin-left: 3%;border-bottom-style: solid;
						border-bottom-color: #E6E6FA;">
					<image  style="height: 25px;width:25px;margin-right: 10px;vertical-align:text-top"
					 src="../../static/img/home/jindukongzhi.png"></image>
					<text style="font-weight: bold;font-size:12px;vertical-align: -webkit-baseline-middle;">进度控制</text>
				</view> -->
				<view  @click="zzzb('基础施工阶段')" style="padding: 8px;margin-left: 3%;border-bottom-style: solid;position: relative;
						border-bottom-color: #E6E6FA;">
					<image  style="height: 25px;width:25px;margin-right: 10px;vertical-align:text-top"
					 src="../../static/img/home/jichushigong.png"></image>
					<text style="font-weight: bold;font-size:26rpx;vertical-align: -webkit-baseline-middle;">基础施工阶段
					    <text style="position: absolute;right: 40rpx;top: 25rpx;color: rgb(187, 187, 187);"
					    class="iconfont">&#xe610;</text>
					</text>
				</view>
				<view @click="zzzb('主体施工阶段')" style="padding: 8px;margin-left: 3%;border-bottom-style: solid;position: relative;
						border-bottom-color: #E6E6FA;">
					<image  style="height: 25px;width:25px;margin-right: 10px;vertical-align:text-top"
					 src="../../static/img/home/zhutishigongjieduan.png"></image>
					<text style="font-weight: bold;font-size:26rpx;vertical-align: -webkit-baseline-middle;">主体施工阶段
					
					  <text style="position: absolute;right: 40rpx;top: 25rpx;color: rgb(187, 187, 187);"
					  class="iconfont">&#xe610;</text>
					</text>
				</view>
				<view  @click="zzzb('装饰装修阶段')" style="padding: 8px;margin-left: 3%;border-bottom-style: solid;position: relative;
						border-bottom-color: #E6E6FA;">
					<image  style="height: 25px;width:25px;margin-right: 10px;vertical-align:text-top"
					 src="../../static/img/home/zhuangxiuzhuangshijieduan.png"></image>
					<text style="font-weight: bold;font-size:26rpx;vertical-align: -webkit-baseline-middle;">装饰装修阶段
					  <text style="position: absolute;right: 40rpx;top: 25rpx;color: rgb(187, 187, 187);"
					  class="iconfont">&#xe610;</text>
					</text>
				</view>
				<view @click="zzzb('竣工交付阶段')" style="padding: 8px;margin-left: 3%;border-bottom-style: solid;position: relative;
						border-bottom-color: #E6E6FA;">
					<image  style="height: 25px;width:25px;margin-right: 10px;vertical-align:text-top"
					 src="../../static/img/home/jungongjiaofujieduan.png"></image>
					<text style="font-weight: bold;font-size:26rpx;vertical-align: -webkit-baseline-middle;">竣工交付阶段
					
					   <text style="position: absolute;right: 40rpx;top: 25rpx;color: rgb(187, 187, 187);"
					   class="iconfont">&#xe610;</text>
					</text>
				</view>
				<view @click="zzzb('常规施工阶段')" style="padding: 8px;margin-left: 3%;border-bottom-style: solid;position: relative;
						border-bottom-color: #E6E6FA;">
					<image  style="height: 25px;width:25px;margin-right: 10px;vertical-align:text-top"
					 src="../../static/img/home/changguishigongjieduan.png"></image>
					<text style="font-weight: bold;font-size:26rpx;vertical-align: -webkit-baseline-middle;">常规施工阶段
					
					  <text style="position: absolute;right: 40rpx;top: 25rpx;color: rgb(187, 187, 187);"
					  class="iconfont">&#xe610;</text>
					</text>
				</view>
				
				<!-- <view @click="zzzb('工程审核管理')" style="padding: 8px;margin-left: 3%;border-bottom-style: solid;position: relative;
						border-bottom-color: #E6E6FA;">
					<image  style="height: 25px;width:25px;margin-right: 10px;vertical-align:text-top"
					 src="../../static/img/home/shenhe.png"></image>
					<text  style="font-weight: bold;font-size:12px;vertical-align: -webkit-baseline-middle;">工程审核管理
					    <text style="position: absolute;right: 40rpx;top: 25rpx;color: rgb(187, 187, 187);"
					    class="iconfont">&#xe610;</text>
					</text>
				</view> -->
				
				<view style="padding: 8px;margin-left: 3%;border-bottom-style: solid; position: relative;
						border-bottom-color: #E6E6FA;" @click="qualityControl">
					<image  style="height: 25px;width:25px;margin-right: 10px;vertical-align:text-top"
					 src="../../static/img/home/zhiliang.png"></image>
					<text style="font-weight: bold;font-size:26rpx;vertical-align: -webkit-baseline-middle;" >质量管理
					  <text style="position: absolute;right: 40rpx;top: 25rpx;color: rgb(187, 187, 187);"
					  class="iconfont">&#xe610;</text>
					</text>
				</view>
				<view style="padding: 8px;margin-left: 3%;border-bottom-style: solid;position: relative;
						border-bottom-color: #E6E6FA;" @click="safetyControl">
					<image  style="height: 25px;width:25px;margin-right: 10px;vertical-align:text-top"
					 src="../../static/img/home/anquan.png"></image>
					<text style="font-weight: bold;font-size:26rpx;vertical-align: -webkit-baseline-middle;" >安全管理
					   <text style="position: absolute;right: 40rpx;top: 25rpx;color: rgb(187, 187, 187);"
					   class="iconfont">&#xe610;</text>
					</text>
				</view>
				
				<view @click="proplemana" style="padding: 8px;margin-left: 3%;border-bottom-style: solid;position: relative;
						border-bottom-color: #E6E6FA;">
					<image  style="height: 25px;width:25px;margin-right: 10px;vertical-align:text-top"
					 src="../../static/img/home/renyuanguanli.png"></image>
					<text style="font-weight: bold;font-size:26rpx;vertical-align: -webkit-baseline-middle;">人员管理
					
					   <text style="position: absolute;right: 40rpx;top: 25rpx;color: rgb(187, 187, 187);"
					   class="iconfont">&#xe610;</text>
					</text>
				</view>
				<view  @tap="deviceCheck(projectInfo.id)" style="padding: 8px;margin-left: 3%;border-bottom-style: solid;position: relative;
						border-bottom-color: #E6E6FA;">
					<image  style="height: 25px;width:25px;margin-right: 10px;vertical-align:text-top"
					 src="../../static/img/检查11.png"></image>
					<text style="font-weight: bold;font-size:26rpx;vertical-align: -webkit-baseline-middle;">设备检查
					  <text style="position: absolute;right: 40rpx;top: 25rpx;color: rgb(187, 187, 187);"
					  class="iconfont">&#xe610;</text>
					
					</text>
				</view>
			
				
				<!-- <view :hover-start-time="20" :hover-stay-time="70" @click="show('right')" style="padding: 8px;margin-left: 3%;border-bottom-style: solid;
						border-bottom-color: #E6E6FA;"> -->
				
					<!-- <uni-drawer :visible="showRight" mode="right" @close="closeDrawer('right')"> -->
						<!-- #ifndef MP-BAIDU || MP-ALIPAY || MP-TOUTIAO -->
						<!-- <uni-list style="overflow:scroll;z-index: 999;"> -->
						    <!-- <uni-list-item :title="item.name" @click="toinfoupload(item)" v-for="item in uniListItemt"/> -->
							<!-- <uni-list-item @tap="toauditlist()" title="资料审核列表" /> -->
						<!-- </uni-list> -->
						<!-- #endif -->
						<!-- #ifdef MP-BAIDU || MP-ALIPAY || MP-TOUTIAO -->
						<!-- #endif -->
					<!-- </uni-drawer> -->
				<!-- </view> -->
				

				
			</view>
			<!-- <view class="navBarButtonBox">
				 //顶部右侧菜单 
				 <view v-if="navBarButton" class="goods_shop_cart_bg navBarButton" @tap="showShopCartBg('nav')"
				 @touchmove.stop.prevent="moveHandleStop"></view>
				<view class="h_newlit" v-bind:class="[navBarButton ? 'active' : '','']"> //
					<view class="em">
						<view style="font-size: 14px" @tap="navBarButtontO('home')">
							<text class="iconfont icon-shouye"></text>
							返回首页
						</view>
						<view style="font-size: 14px" @tap="navBarButtontO('search')">
							<text class="iconfont icon-sousuo"></text>
							超级搜索
						</view>
						<view style="font-size: 14px" @tap="navBarButtontO('footer')">
							<text class="iconfont icon-zuji"></text>
							我的足迹
						</view>
						<view style="font-size: 14px" @tap="navBarButtontO('like')">
							<text class="iconfont icon-shoucang"></text>
							个人中心
						</view>
					</view>
				</view> 
			</view> -->
		
		</view>	
	</view>
</template>
</view>
<script>
	/* import simpleModal from '../../components/simple-pro/customModal.vue';
	import uniDrawer from '@/components/navlisttow/uni-drawer/uni-drawer.vue'
	import uniList from '@/components/navlisttow/uni-list/uni-list.vue'
	import uniListItem from '@/components/navlisttow/uni-list-item/uni-list-item.vue'
	import uniSection from '@/components/navlisttow/uni-section/uni-section.vue'
	import uniIcons from '@/components/navlisttow/uni-icons/uni-icons.vue' */
	let _this;
	export default {
		/* onShareAppMessage(res) {
			return {
				title: this.goods.itemtitle,
				path: '/pages/detail/goodsinfo?itemid=' + this.itemid
			}
		}, */
		data() {
			return {
				showRight: false,
				showLeft: false,
				buyDes: "口令购买",
				collect: {
					name: '收藏',
					isCollect: "",
				},
				show_share: false,
				itemid: '',
				loadGoods: true,
				goods: {},
				taoBaoBuy: true,
				shopCartBg: false,
				scrollTop: false,
				couponlist: [],
				navBarButton: false,
				copyTklStatus: false,
				save: false,
				tkl: '',
				relation_id: null,
				money: 0,
				showFollow: false,
				isWeiXin: false,
				footprintKey: 'orange-sqx-footprint',
				collectKey: 'orange-sqx-collect',
				poster: {},
				qrShow: false,
				canvasId: 'default_PosterCanvasId',
				//chenl
				projectInfo:{},
				stateTime:{},
				senTime:{
					yy:"2022",
					dd:"00/00"
				},
				scheduleTime:{} ,//进度时间
				uniListItemt:[] ,//点击菜单的二级菜单集合
				city:"" //当前城市拼音 //天气http
				
				
			};
		},
		components: {
			/* simpleModal,
			uniIcons,
			uniDrawer,
			uniList,
			uniListItem,
			uniSection */
		},
		/* onShow: function() {
			this.copyTklStatus = false;
		}, */
		onLoad: function(e) {
			_this=this;
			console.log("进入项目详情")
			console.log(e)
			console.log(JSON.parse(e.itemid));
			this.projectInfo=JSON.parse(e.itemid);
			//将项目id存入
			if(_this.projectInfo!=null){
				uni.setStorageSync("projectId",this.projectInfo.id);
				//设置导航栏title
				uni.setNavigationBarTitle({
				     title: _this.projectInfo.projectName+"项目"
				 });
			}
			if(_this.projectInfo.createDate.length>0){
				let time=_this.projectInfo.createDate.substring(0,10).split('-');
				_this.stateTime={
					yy:time[0],
					dd:time[1]+"/"+time[2]
				}
				//console.log(_this.stateTime)
			}
			if(_this.projectInfo.updateDate.length>0){
				let time=_this.projectInfo.updateDate.substring(0,10).split('-');
				_this.scheduleTime={
					yy:time[0],
					dd:time[1]+"/"+time[2]
				}
				//console.log(_this.scheduleTime)
			}
			console.log("--------------------")
			this.dingwei();
			
			
		
		},
		/* onPageScroll: function(e) {
			this.scrollTop = e.scrollTop > 200;
		}, */

		onNavigationBarButtonTap: function() {
			this.navBarButton = !this.navBarButton;
			this.showRight = !this.showRight
			console.log("ddd")
		},
		/* onBackPress() {
			if (this.showRight || this.showLeft) {
				this.hide()
				return true
			}
			console.log("onBackPress")
		}, */
		methods: {
			zzzb(pname){
				console.log("点击"+pname)
				uni.navigateTo({
					url:"./nextlists?pname="+pname
				})
				
				
				
			},
			/* show(e) {
				console.log("show", e);
				if (e === 'left') {
					this.showLeft = true
				} else {
					this.showRight = true
				}
			},
			hide() {
				console.log("hide");
				this.showLeft = false
				this.showRight = false
			},
			closeDrawer(e) {
				if (e === 'left') {
					this.showLeft = false
				} else {
					this.showRight = false
				}
			}, */
			confirm() {},
			qualityControl(){  //质量管理
				uni.navigateTo({
					url: '/pages/qualityCheck/qualityCheck'
				});
			},
			safetyControl(){  //安全管理
				uni.navigateTo({
					url: '/pages/securityCheck/securityCheck'
				});
			},
			//设备检查
			deviceCheck(id){
				//id是项目id
				//id=uni.getStorageSync('projectId');
				uni.navigateTo({
					url: '/pages/deviceCheck/deviceCheck?id='+id
				});
				
			},
			//人员管理
			proplemana(){
				uni.navigateTo({
					url: '/pages/peoplemanagement/peoplemanagement?pid='+_this.projectInfo.id
				});
			},
			/* 点击页面调转到上传页面 */
			toinfoupload: function(item){
				
				console.log(item);
				
				uni.navigateTo({
					url: '/pages/upload/upload?obj='+JSON.stringify(item)
				})

			},

			/* 点击页面调转到审核页面 */
			toauditlist: function(title){
				uni.navigateTo({
					url: '/pages/audit/dataAudit/dataAudit'
				})
			},
			formatDate: function(now) {
				const year = now.getFullYear();
				const month = now.getMonth() + 1;
				const date = now.getDate();
				return year + "-" + month + "-" + date;
			},
			//定位
			dingwei(){
				uni.request({
					url:"http://pv.sohu.com/cityjson?ie=utf-8",
					success(data) {
						let dt=data.data;
						dt=JSON.parse(dt.substring(dt.indexOf('{'),dt.lastIndexOf('}')+1))
						let ctry=dt.cname.substring(dt.cname.indexOf('省')+1,dt.cname.lastIndexOf('市'))
						//console.log(ctry)
						uni.request({
							url:"https://msp.ccc.cmbchina.com/ita/new/cdn/api/OscarService/GetPinYin?request="+ctry,
							success(data) {		
								if(data.statusCode==200){
									let str = data.data.Data.replace(/\s+/g,"").toLowerCase();
									_this.city="http://i.tianqi.com/index.php?c=code&a=getcode&id=38&py="+str+"&h=60&w=610&color=%23FFFFFF";
									//console.log(_this.city)
								}	
							}
						})	
					}
				});	
			}

		}
	};
</script>

<style>
	@import '../../static/css/index.css';

 

	.swiper-container {
		min-height: 100vw;
	}

	.hideCanvasView {
		position: relative;
	}

	.hideCanvas {
		position: fixed;
		top: -99999 upx;
		left: -99999 upx;
		z-index: -99999;
	}

	.flex_row_c_c {
		display: flex;
		flex-direction: row;
		justify-content: center;
		align-items: center;
	}

	.modalView {
		width: 100%;
		height: 100%;
		position: fixed;
		top: 0;
		left: 0;
		right: 0;
		bottom: 0;
		opacity: 0;
		outline: 0;
		transform: scale(3);
		perspective: 2500 upx;
		background: rgba(0, 0, 0, 0.6);
		transition: all .3s ease-in-out;
		pointer-events: none;
		backface-visibility: hidden;
		z-index: 999;
	}

	.modalView.show {
		opacity: 1;
		transform: scale(1);
		pointer-events: auto;
	}

	.flex_column {
		display: flex;
		flex-direction: column;
	}

	.backgroundColor-white {
		background-color: white;
	}

	.border_radius_10px {
		border-radius: 10px;
	}

	.padding1vh {
		padding: 1vh;
	}

	.posterImage {
		width: 60vw;
	}

	.flex_row {
		display: flex;
		flex-direction: row;
	}

	.marginTop2vh {
		margin-top: 2vh;
	}

	.shareInfos {
		color: #FC3F78;
	}

	.shareInfo::after {
		border: none;
	}

	button {
		font-size: 14px;
	}

	#shareit {
		-webkit-user-select: none;
		position: fixed;
		width: 100%;
		height: 2000px;
		background: rgba(0, 0, 0, 0.85);
		text-align: center;
		top: 0;
		left: 0;
		z-index: 999;
	}

	#shareit img {
		max-width: 100%;
	}

	.arrow {
		width: 100px;
		height: 150px;
		position: absolute;
		right: 5%;
		top: 1%;
	}

	#follow {
		width: 100%;
		height: 50px;
		line-height: 50px;
		text-align: center;
		text-decoration: none;
		font-size: 18px;
		color: white;
		float: left;
		margin-top: 160px;
	}

	#follow1 {
		width: 100%;
		height: 50px;
		line-height: 50px;
		text-align: center;
		text-decoration: none;
		font-size: 18px;
		color: white;
		float: left;
		margin-top: 170px;
	}

	button::after {
		border: none;
	}

	.swiper-wrapper {
		width: 100%;
	}
</style>
